/* description
 function: get the file size of a particular file /
           truncate or add 0 string to the file according to the threshold
 embed two functions of python script into c++ program
 written by He Dongjing, Shanghai Jiao Tong University 
*/
#ifndef __PRE_FFT_H__
#define __PRE_FFT_H__

#define THRESHOLD 1.1

unsigned long get_file_size(const char *filename);
bool is_power_2(unsigned long num);
unsigned long floor_to_power_2(unsigned long num);
unsigned long ceil_to_power_2(unsigned long num);
int add_file(const char *file_name, unsigned long dest_size);
int trunc_file(const char *file_name, unsigned long dest_size);
int trunc_or_add(const char *file_name);
void split_file(const char *file_name, char *block_size);

#endif
